<link rel="stylesheet" href="../static/bootstrap/css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="../static/jBox/Skins/Metro/jbox.css" type="text/css">
<link rel="stylesheet" href="../static/dist/css/AdminLTE.min.css" type="text/css">
<link rel="stylesheet" href="../static/css/admin.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/treeTable/jquery.treetable.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/treeTable/jquery.treetable.theme.default.css" type="text/css">
<link rel="stylesheet" href="../static/plugins/datatables/jquery.dataTables.css" type="text/css">
<style>
.ul_tree_display {
	display: none;
}

.tr_tree_display {
	display: none;
}

.table>tbody>tr>td {
	vertical-align: middle;
	font-size: 0.8em;
}

.layui-layer-content p {
	padding: 15px;
}

.dataTables_length {
	margin-top: 10px;
}
</style>
<div class="tabs-panel">
	<div class="row">
		<div class="col-xs-12">
			<div class="box">
				<div class="box-header">
					<label>手机号：</label><input class="depart-input" name="mobile" id="mobile" type="text" placeholder="">
					<label>优惠券验证码：</label><input class="depart-input" name="sms_verification" id="sms_verification" type="text" placeholder="">
					<label>发放状态：</label>
                    <select id="is_exchange" name="is_exchange" class="depart-input" style="width: 150px">
                    	<option value="">全部</option>
                        <option selected value="0">未发放</option>
                        <option value="1">已发放</option>
                    </select>&nbsp;
					<button type="button" class="btn btn-primary depart-modal" onclick="table_list_reload()" style="width: 100px;">查询</button>
					&nbsp;
					<button type="button" class="btn btn-warning depart-modal" id="reset_button" style="width: 100px;">重置</button>
					&nbsp;
					<button type="button" class="btn btn-success depart-modal grant_coupon" style="width: 100px;">发放优惠券</button>
				</div>
				<div class="box-body">
					<table id="table_list" class="table table-bordered table-hover">
						<thead>
							<tr>
								<th class=""></th>
								<th class="">优惠券名称</th>
								<th class="">有效期</th>
								<th class="">发放状态</th>
							</tr>
						</thead>
						<tbody>
						</tbody>
					</table>
				</div>
			</div>
		</div>
	</div>
</div>

<div class="modal fade" id="coupon-modal" style="background: rgba(236, 230, 230, 0.3);" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width: 70%;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">
                    &times;
                </button>
                <h4 class="modal-title" id="myModalLabel">优惠卷查询</h4>
            </div>
            <div class="modal-body">
                <form action="/coupon/change-coupon" method="post" name="coupon_form" id="coupon_form">
                    <div class="box-body">
                        <label for="tag_group_id_add"><span class="text-danger" style="font-size:20px;">* </span>手机号码</label>
                        <input style="width: 25%;" class="depart-input" name="mobile_2" id="mobile_2" placeholder="手机号码" type="text">
                        <label for="tag_group_id_add"><span class="text-danger" style="font-size:20px;">* </span>优惠券验证码</label>
                        <input style="width: 25%;" class="depart-input" name="sms_verification_2" id="sms_verification_2" placeholder="优惠券验证码" type="text">
                        &nbsp;
                        <button type="button" class="btn btn-success depart-modal get-grant-coupon" style="width: 100px;">查看优惠券</button>
                        <div class="form-group">
                            <table class="table table-hover" id="table_list_2">
                            	<thead>
                                    <tr>
                                        <th>优惠券名称</th>
                                        <th>有效期</th>
                                        <th>发放状态</th>
                                    </tr>
                                </thead>
                                <tbody class="tbody-class">
                                </tbody>
                            </table>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-primary depart-modal" onclick="grantCoupon()" style="width: 100px;">发放优惠券</button>
            </div>
        </div>
    </div>
</div>
<!-- 固定js -->
<script type="text/javascript" src="/static/plugins/jQuery/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/static/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script type="text/javascript" src="/static/jBox/jquery.jBox-2.3.min.js"></script>
<script type="text/javascript" src="/static/jBox/i18n/jquery.jBox-zh-CN.js"></script>
<script type="text/javascript" src="/static/plugins/treeTable/jquery.treetable.js"></script>
<!-- 自定义js -->
<script type="text/javascript" src="/static/app/global.js?version=<?=Yii::$app->params['version']?>"></script>
<script type="text/javascript" src="/static/app/coupon/index.js?version=<?=Yii::$app->params['version']?>"></script>